from common.mysql_operate import MySQLDatabase
from config.mysql_config import DB_CONFIG

def main():
    # 初始化数据库连接
    db = MySQLDatabase(DB_CONFIG)

    # 删除操作示例（注释掉避免误删）
    rows_deleted = db.delete('tb_user', "name = %s", ('张三',))
    print(f"删除了 {rows_deleted} 条记录")

    # 关闭连接
    db.close()

if __name__ == "__main__":
    main()